wayland: Don't save size when tiled
authorMatthias Clasen <mclasen@redhat.com>
Tue, 6 Oct 2020 00:15:33 +0000 (20:15 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Tue, 6 Oct 2020 00:15:33 +0000 (20:15 -0400)
Don't remember the surface size when we are in tiled
state either. This matches the 'fixed_size' condition
in gdk_wayland_surface_configure_toplevel.

This change fixes an issue where moving a window first
to tiled, then to maximized state and back would lead
to the unmaximized window having the tiled dimensions.

gdk/wayland/gdksurface-wayland.c

index ccc4fa67efad24397f736ccabdbefbc11221989d..87eaae752dc70451505e5eedaa4a9abda8fe0d47 100644 (file)
@@ -333,7 +333,9 @@ _gdk_wayland_surface_save_size (GdkSurface *surface)
 {
   GdkWaylandSurface *impl = GDK_WAYLAND_SURFACE (surface);
 
-  if (surface->state & (GDK_TOPLEVEL_STATE_FULLSCREEN | GDK_TOPLEVEL_STATE_MAXIMIZED))
+  if (surface->state & (GDK_TOPLEVEL_STATE_FULLSCREEN |
+                        GDK_TOPLEVEL_STATE_MAXIMIZED |
+                        GDK_TOPLEVEL_STATE_TILED))
     return;
 
   impl->saved_width = surface->width - impl->margin_left - impl->margin_right;